<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>反向引用</title>
</head>
<body>
	<p>
	2017-05-22   =>   05/22/2017
	</p>
	
	<script type="text/javascript">
	var str = "2017-05-22";
	alert(str.replace(/(\d{4})\-(\d{2})\-(\d{2})/g, "$2/$3/$1"));
	</script>
</body>
</html>